package com.ebt.m.msgnote.view;

import android.widget.ImageView;
import android.widget.TextView;

import com.ebt.m.R;
import com.ebt.m.commons.mvp.MvpBaseActivity;
import com.ebt.m.msgnote.contract.ITypeMsgContract;
import com.ebt.m.msgnote.presenter.TypeMsgPresenter;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Description :
 *
 * @author allen
 * @date 2018/7/30  14:31
 * - generate by MvpAutoCodePlus plugin.
 */

public class TypeMsgActivity extends MvpBaseActivity<ITypeMsgContract.Presenter> implements ITypeMsgContract.View {

    @BindView(R.id.iv_msg_top_back)
    ImageView ivMsgTopBack;
    @BindView(R.id.msgTypeListView)
    TypeMsgListView msgTypeListView;
    @BindView(R.id.tv_msg_headtitle)
    TextView tvMsgHeadtitle;

    @Override
    public void initArguments() {

    }

    @Override
    public void setEmptyView(boolean isEmpty) {

    }

    @Override
    protected ITypeMsgContract.Presenter createPresenter() {
        return new TypeMsgPresenter(this, this);
    }

    @Override
    protected int setContentResource() {
        return R.layout.msg_type_list;
    }

    @Override
    protected void onActivityCreate() {
        String title = getIntent().getStringExtra("name");
        tvMsgHeadtitle.setText(title);
        int type = getIntent().getIntExtra("type", 0);
        msgTypeListView.update(type);
    }

    @Override
    protected void onActivityDestroy() {

    }


    @OnClick(R.id.iv_msg_top_back)
    public void onViewClicked() {
        finish();
    }
}

